<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>css三个盒子案例</title>
    <style>
        /* 通配符选择器 */
        * {
            color: gold;
        }

        /* 标签选择器 */
        div {
            width: 100px;
            height: 100px;
            color: white;
            font-size: 20px;
        }

        /* 类选择器：class */
        .red {
            background-color: red;
        }

        .green {
            background-color: green;
        }

        .blue {
            background-color: blue;
        }

        /* id选择器：样式#定义，结构id调用，只能调用一次 */
        #pink {
            color: pink;
        }
    </style>

</head>

<body>
    <div class="red">红色</div>
    <div class="green">绿色</div>
    <div class="blue">蓝色</div>
    <div id="pink">瑞幸咖啡</div>
    <div>我的</div>
    <span>他的</span>
</body>

</html>